/*
 * @Author: Li Zengkun
 * @Date: 2022-09-12 19:33:27
 * @LastEditors: Li Zengkun
 * @LastEditTime: 2022-09-13 09:52:37
 * @Description: 
 */
import axios from "axios"

// 管理员登陆
const login = (data) => axios.post('/admin/login', data)

// 管理员注册
const register = (data) => axios.post('/admin/register', data)

// 修改信息
const account = (data) => axios.post('/admin/account', data)

// 删除账户
const remove = (data) => axios.post('/admin/remove', data)

// 检测用户名是否可用
const checkUsername = (data) => axios.post('/admin/check/username', data)

// 编辑管理员个人资料
const edit = (data) => axios.post('/admin/info', data)

// 获取管理员个人资料
const info = (params) => axios.get('/admin/info', { params })

// 获取管理员列表
const list = (params) => axios.get('/admin/list', { params })

export default {
    login,
    register,
    list,
    info,
    edit,
    remove,
    account,
    checkUsername
}